package com.jh.user.pojo.freeQuick;

import cn.jh.common.pay.jdpush.CalFeeStatus;
import cn.jh.common.pay.jdpush.OrderStatus;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Objects;

/**
 * @author Yichuan
 * @version 1.0
 */
public class PayNotify implements Serializable {

    private static final long serialVersionUID = 3593754168887847757L;

    private String code;

    private String bizMsg;

    private String bizCode;

    private String merchantNo;

    private String requestNo;

    private BigDecimal amount;

    private OrderStatus status;

    private BigDecimal fee;

    private CalFeeStatus feeStatus;

    @JsonIgnore
    private transient String content;

    public PayNotify() {
        super();
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getBizMsg() {
        return bizMsg;
    }

    public void setBizMsg(String bizMsg) {
        this.bizMsg = bizMsg;
    }

    public String getBizCode() {
        return bizCode;
    }

    public void setBizCode(String bizCode) {
        this.bizCode = bizCode;
    }

    public String getMerchantNo() {
        return merchantNo;
    }

    public void setMerchantNo(String merchantNo) {
        this.merchantNo = merchantNo;
    }

    public String getRequestNo() {
        return requestNo;
    }

    public void setRequestNo(String requestNo) {
        this.requestNo = requestNo;
    }

    public BigDecimal getAmount() {
        return amount;
    }

    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

    public OrderStatus getStatus() {
        return status;
    }

    public void setStatus(OrderStatus status) {
        this.status = status;
    }

    public BigDecimal getFee() {
        return fee;
    }

    public void setFee(BigDecimal fee) {
        this.fee = fee;
    }

    @JsonProperty("isCalFee")
    public CalFeeStatus getFeeStatus() {
        return feeStatus;
    }

    public void setFeeStatus(CalFeeStatus feeStatus) {
        this.feeStatus = feeStatus;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public boolean isFail() {
        return !Objects.equals(bizCode, "1");
    }
}
